.TH std::ranges::iterator_t,std::ranges::const_iterator_t,std::ranges::sentinel_t, 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::ranges::iterator_t,std::ranges::const_iterator_t,std::ranges::sentinel_t, \- std::ranges::iterator_t,std::ranges::const_iterator_t,std::ranges::sentinel_t,

.SH Synopsis
                std::ranges::range_value_t, std::ranges::range_reference_t

   Defined in header <ranges>
   template< class T >                                                     \fB(1)\fP  (since
   using iterator_t = decltype(ranges::begin(std::declval<T&>()));              C++20)
   template< ranges::range R >                                             \fB(2)\fP  (since
   using const_iterator_t = decltype(ranges::cbegin(std::declval<R&>()));       C++23)
   template< ranges::range R >                                             \fB(3)\fP  (since
   using sentinel_t = decltype(ranges::end(std::declval<R&>()));                C++20)
   template< ranges::range R >                                             \fB(4)\fP  (since
   using const_sentinel_t = decltype(ranges::cend(std::declval<R&>()));         C++23)
   template< ranges::sized_range R >                                       \fB(5)\fP  (since
   using range_size_t = decltype(ranges::size(std::declval<R&>()));             C++20)
   template< ranges::range R >                                                  (since
   using range_difference_t =                                              \fB(6)\fP  C++20)
   std::iter_difference_t<ranges::iterator_t<R>>;
   template< ranges::range R >                                             \fB(7)\fP  (since
   using range_value_t = std::iter_value_t<ranges::iterator_t<R>>;              C++20)
   template< ranges::range R >                                             \fB(8)\fP  (since
   using range_reference_t = std::iter_reference_t<ranges::iterator_t<R>>;      C++20)
   template< ranges::range R >
                                                                                (since
   using range_const_reference_t =                                         \fB(9)\fP  C++23)

       std::iter_const_reference_t<ranges::iterator_t<R>>;
   template< ranges::range R >
                                                                                (since
   using range_rvalue_reference_t =                                        \fB(10)\fP C++20)

       std::iter_rvalue_reference_t<ranges::iterator_t<R>>;
   template< ranges::range R >
                                                                                (since
   using range_common_reference_t =                                        \fB(11)\fP C++20)

       std::iter_common_reference_t<ranges::iterator_t<R>>;

   1) Used to obtain the iterator type of the type T.
   2) Used to obtain the constant iterator type of the range type R.
   3) Used to obtain the sentinel type of the range type R.
   4) Used to obtain the constant sentinel type of the range type R.
   5) Used to obtain the size type of the sized_range type R.
   6) Used to obtain the difference type of the iterator type of range type R.
   7) Used to obtain the value type of the iterator type of range type R.
   8) Used to obtain the reference type of the iterator type of range type R.
   9) Used to obtain the constant reference type of the iterator type of range type R.
   10) Used to obtain the rvalue reference type of the iterator type of range type R.
   11) Used to obtain the common reference type of the iterator type of range type R.

.SH Template parameters

   T - a type that can be used in std::ranges::begin
   R - a range type or a sized_range type

.SH Notes

   iterator_t can be applied to non-range types, e.g. arrays with unknown bound.

   Defect reports

   The following behavior-changing defect reports were applied retroactively to
   previously published C++ standards.

      DR    Applied to              Behavior as published              Correct behavior
   LWG 3860 C++20      range_common_reference_t was missing            added
                       const_iterator_t and const_sentinel_t were
   LWG 3946 C++23      inconsistent                                    tweaked
                       with the result of ranges::cbegin and
                       ranges::cend respectively

.SH See also

   iter_value_t
   iter_reference_t
   iter_const_reference_t
   iter_difference_t
   iter_rvalue_reference_t
   iter_common_reference_t computes the associated types of an iterator
   (C++20)                 (alias template)
   (C++20)
   (C++23)
   (C++20)
   (C++20)
   (C++20)
